home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Varsity Update 1998 August
/
SGI Varsity Update 1998 August.iso
/
dist
/
dist6.5
/
il_dev.idb
/
usr
/
include
/
il
/
ilCropImg.h.z
/
ilCropImg.h
Wrap
C/C++ Source or Header
|
1998-07-29
|
3KB
|
99 lines
#if 0
Copyright (c) 1991 SGI All Rights Reserved
THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
The copyright notice above does not evidence any
actual or intended publication of such source code,
and is an unpublished work by Silicon Graphics, Inc.
This material contains CONFIDENTIAL INFORMATION that
is the property of Silicon Graphics, Inc. Any use,
duplication or disclosure not specifically authorized
by Silicon Graphics is strictly prohibited.
RESTRICTED RIGHTS LEGEND:
Use, duplication or disclosure by the Government is
subject to restrictions as set forth in subdivision
(c)(1)(ii) of the Rights in Technical Data and Computer
Software clause at DFARS 52.227-7013, and/or in similar
or successor clauses in the FAR, DOD or NASA FAR
Supplement. Unpublished- rights reserved under the
Copyright Laws of the United States. Contractor is
SILICON GRAPHICS, INC., 2011 N. Shoreline Blvd.,
Mountain View, CA 94039-7311
#endif
/*
Defines a rectangular subregion and/or channel subset of a parent image.
*/
#ifndef _ilCropImg_h_
#define _ilCropImg_h_
#include <il/ilImage.h>
class ilCropImg : public ilImage {
public:
iflClassListDeclare
~ilCropImg();
// external api: begin
ilCropImg(ilImage* src=NULL, int xs=0, int ys=0, int nx=0, int ny=0)
{ init(src, xs, ys, 0, 0, nx, ny); }
// external api: name=ilCropImgList
ilCropImg(ilImage* src, int nc, int* clist)
{ init(src, 0, 0, 0, 0, 0, 0, 0, nc, clist); }
void getOrigin(int& xs, int& ys, int& zs)
{ xs = origin.x; ys = origin.y; zs = origin.z; }
// external api: name=getOrigin4D
void getOrigin(int& xs, int& ys, int& zs, int& cs)
{ xs = origin.x; ys = origin.y; zs = origin.z; cs = origin.c; }
void setOrigin(const int xs, const int ys, const int zs=0);
// external api: name=setOrigin4D
void setOrigin(const int xs, const int ys, const int zs, const int cs);
void setChannelList(int nc, int *clist);
void clearChannelList();
void setClip(int x, int y, int nx, int ny);
// external api: name=setClip3D
void setClip(int x, int y, int z, int nx, int ny, int nz);
void clearClip();
void getClip(int& x, int& y, int& z, int& nx, int& ny, int& nz)
{
x = clip.x; y = clip.y; z = clip.z;
nx = clip.nx; ny = clip.ny; nz = clip.nz;
}
// external api: end
virtual ilStatus qGetSubTile3D(ilMpNode* parent, int x, int y, int z,
int nx, int ny, int nz, void*& data, int dx,
int dy, int dz, int dnx, int dny, int dnz,
const ilConfig* config=NULL,
ilMpManager** pMgr=NULL);
protected:
virtual void reset();
virtual ilHwOp* hwDefine();
private:
iflXYZCint origin; // origin of subimage
iflTile clip; // clip area of subimage
int* channelList; // spec for permuting channels
void init(ilImage* src, int xs=0, int ys=0, int zs=0, int cs=0,
int nx=0, int ny=0, int nz=0, int nc=0, int *clist=NULL);
int makeConfig(ilConfig& config, const ilConfig* cfg);
ilImageTile* getInputTileRequirement(const iflTile3Dint& tile, int c,int nc,
int* chans, int& inputTileCount);
};
#endif